﻿#pragma once

#include <QtWidgets/QMainWindow>
#include "ui_LbsCellocation.h"
#include "LbsObjectThread.h"
#include <QJsonValue>



class BaseLocation
{
public:
    BaseLocation() {};
    ~BaseLocation() {};

    QString mcc = "";
    QString mnc;
    QString ac;
    QString ci;
    QString coord = "";

    QString lat;
    QString lon;
    QString radius;
    QString address;

    QString province;
    QString city;
    QString district;
    QString town;

    int errcode = 0;

    void ExtractCityFromAddress();
};


class LbsCellocation : public QMainWindow
{
    Q_OBJECT

public:
    LbsCellocation(QWidget *parent = Q_NULLPTR);

    BaseLocation GetCellByLBS(const QString& mncacci);
    //BaseLocation GetCellByJuhe(const QString& mncacci);

public slots:
    void sltSelectFile();
    void sltStartParseObtain();
private:
    QList<QStringList> GetAllDataFromFile(QString filepath);
    QStringList GetAllLbsOrdered(const QList<QStringList>& lstRow);

    Ui::LbsCellocationClass ui;


};
